package cn.xyfmzmy.collection;

public class HashMapTest {

    public static void main(String[] args) {
        long start = System.currentTimeMillis();
        MyHashMap<String, String> myHashMap = new MyHashMap<>();
        int count = 100000;
        for(int i=0;i<count;i++){
            myHashMap.put(String.valueOf(i),String.valueOf(i));
        }

        System.out.println(count == myHashMap.size());

        for(int i=0;i<count;i++){
            if(!String.valueOf(i).equals(myHashMap.get(String.valueOf(i)))){
                System.out.println("不一致");
                break;
            }
        }

        myHashMap.remove("8");
        System.out.println(myHashMap.get("8"));

        System.out.println(myHashMap.size() == count-1);
        long end = System.currentTimeMillis();
        long total = end - start;
        System.out.println("共耗时：" + total + "ms");
    }
}
